package ch4tree;

import java.util.Collection;
import java.util.HashMap;

enum State {
	Unvisited, Visited, Visiting;
}

class Graph {
	Collection<GraphNode> nodes;

	public Graph(Collection<GraphNode> nodes) {
		this.nodes = nodes;
	}
	
	public Collection<GraphNode> getNodes() {
		return nodes;
	}
}

public class Ex2 {

	public static void main(String ... argv) {
		int [] vertices = {1, 2, 3, 4, 5, 6};
		int [] [] edges = {{1, 2}, {1, 3}, {2, 3}, {3, 5}, {2, 4}, {4, 6}};
		HashMap<Integer, GraphNode> nodes = Chapter.createGraph(vertices, edges, false);
		Graph g = new Graph(nodes.values());
		GraphNode start = nodes.get(1);
		GraphNode end = nodes.get(6);
		boolean search = GraphAlgorithms.depthFirstSearch(g, start, end);
		search = GraphAlgorithms.breathFirstSearch(g, start, end);
		search = GraphAlgorithms.recursiveDFS(g, start, end);
	}
}
